package com.gome.ocean.common.enums.job;

/**
 * Created by liuqingxia on 2016/5/27.
 */
public enum JobExecuteType {
                            CRON(0), ONCE(1);

    private int value;

    private JobExecuteType(int value){
        this.value = value;
    }

    public static JobExecuteType getJobExecuteType(int value) {
        for (JobExecuteType type : JobExecuteType.values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        return null;
    }

    public int getValue() {
        return value;
    }
}
